package com.ganee.agora.adapter

import android.view.View
import android.widget.ImageView
import android.widget.TextView
import androidx.core.content.ContextCompat
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.load.resource.bitmap.CenterCrop
import com.chad.library.adapter.base.BaseQuickAdapter
import com.ganee.agora.R
import com.ganee.agora.manager.RecyclerViewHolder
import com.ganee.agora.model.HomeListBean
import com.ganee.baselib.widget.image.transform.GlideRoundTransform
import com.ganee.baselib.mvvmlibrary.widget.loadingdrawable.DensityUtil
import com.ganee.agora.manager.RoundedCornersTransform
import com.ganee.agora.model.InsertActivityEntity
import com.ganee.agora.model.RepeatListEntity


/**
 *    @author : EricCui
 *    date   : 2020-01-01 17:52
 *    desc   : Repeat adapter
 */

class RepeatListAdapter (entityList: MutableList<RepeatListEntity>) : BaseQuickAdapter<RepeatListEntity,
        RecyclerViewHolder>(R.layout.item_recyclerview_repeat,entityList){


    override fun convert(helper: RecyclerViewHolder, item: RepeatListEntity?) {
        if (item != null){

            val tvTitle = helper.getView<TextView>(R.id.item_tv_title) as TextView
            tvTitle.text = item.title

            if (item.check) {
                tvTitle.setTextColor(ContextCompat.getColor(mContext,R.color.color_login_yellow))
            } else {
                tvTitle.setTextColor(ContextCompat.getColor(mContext,R.color.color_repeat_text))
            }
        }
    }

}